import request from '@/config/request.js';

// 获取用户列表
export const userList = (params) => request.get('/system/user/list', params)

// 获取用户信息
export const userById = (id) => request.get('/system/user/' + id)

//获取字典
export const getDictList = (type) => request.get('/system/dict/data/list', {dictType:type},{ custom: {loading: false} })

//提交客户
export const addCustomer = (params) => request.post('/base/customer',params)

//提交客户
export const submitAddCustomer = (params) => request.post('/base/customer/addCommit',params)

//获取创建客户列表
export const myCustomerList = (params) => request.get('/base/customer/page', params,{ dataType: 'json',custom: {dataType: 'json'} })

//获取创建客户列表
export const getCustomerDetail = (id) => request.get('/base/customer/'+id)

// 删除客户
export const delCustomer = (id) => request.delete('/base/customer/'+id)

//选择人员
export const selectPeople = (params) => request.get('/system/user/list',params,{ custom: {dataType: 'json'} })


//跟进列表
export const followList = (params) =>  request.get('/base/followRecord/page', params,{ dataType: 'json',custom: {dataType: 'json'} })

//提交客户
export const addFollow = (params) => request.post('/base/followRecord',params)

//获取暂存
export const getZanCunForm = () => request.get('/base/customer/temp')
